﻿<Window x:Class="MapTrackerApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="411" Width="719" xmlns:my="clr-namespace:System.Windows.Controls;assembly=GMap.NET.WindowsPresentation" MouseDoubleClick="gMap_MouseDoubleClick" MouseWheel="gMap_MouseWheel">
    <Grid MouseWheel="gMap_MouseWheel" MouseDown="Grid_MouseDown">
        
        
            <my:GMapControl Name="gMap" MouseWheel="gMap_MouseWheel" MouseDoubleClick="gMap_MouseDoubleClick" OnTileLoadStart="gMap_OnTileLoadStart" OnTileLoadComplete="gMap_OnTileLoadComplete" />
        
        <DockPanel LastChildFill="True" Height="25" VerticalAlignment="Top">
            <ComboBox Name="mapProviders" DropDownClosed="mapProviders_DropDownClosed" DockPanel.Dock="Left" Width="150" Background="#2F000000"/>
            <Slider Name="zoom" Maximum="100" ValueChanged="zoom_ValueChanged" DockPanel.Dock="top" Background="#2F000000" />
        </DockPanel>
        <ProgressBar Height="20" HorizontalAlignment="Right" Name="progress" VerticalAlignment="Bottom" Width="200" Visibility="Hidden" Background="#50000000" OverridesDefaultStyle="False" IsIndeterminate="True"/>

        <Border HorizontalAlignment="Right" VerticalAlignment="Center" Name="border1" Width="160" Height="200" CornerRadius="8,8,8,8" ClipToBounds="False" BorderThickness="1" BorderBrush="#FF000064" Opacity="0.2">
            <Border.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <LinearGradientBrush.GradientStops>
                        <GradientStop Offset="0" Color="#AF0062B6"/>
                        <GradientStop Offset="1" Color="#E90089FE"/>
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Border.Background>
            <Border.BitmapEffect>
                <BitmapEffectGroup>
                    <DropShadowBitmapEffect Color="Black" Direction="210" 
        ShadowDepth="5" Softness="1" Opacity="0.6"/>
                </BitmapEffectGroup>
            </Border.BitmapEffect>
            
            <Border.RenderTransform>
                <TranslateTransform X="150"/>
            </Border.RenderTransform>
            <Border.Triggers>
                <EventTrigger x:Name="HoverIn" RoutedEvent="Border.MouseEnter" SourceName="border1">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation
                                    Storyboard.TargetName="border1"
                                    Storyboard.TargetProperty="(Border.RenderTransform).(TranslateTransform.X)"
                                    From="150"
                                    To="10"
                                    Duration="0:0:0.2"
                                    RepeatBehavior="1x" />
                                <DoubleAnimation 
                                    Storyboard.TargetName="border1"
                                    Storyboard.TargetProperty="Opacity"
                                    From="0.2"
                                    To="0.9"
                                    Duration="0:0:0.2"
                                    RepeatBehavior="1x"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
                <EventTrigger x:Name="HoverOut" RoutedEvent="Border.MouseLeave" SourceName="border1">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation
                                    Storyboard.TargetName="border1"
                                    Storyboard.TargetProperty="(Border.RenderTransform).(TranslateTransform.X)"
                                    From="10"
                                    To="150"
                                    Duration="0:0:0.2"
                                    RepeatBehavior="1x" />
                                <DoubleAnimation 
                                    Storyboard.TargetName="border1"
                                    Storyboard.TargetProperty="Opacity"
                                    From="0.9"
                                    To="0.2"
                                    Duration="0:0:0.2"
                                    RepeatBehavior="1x"/>
                                
                            </Storyboard>                            
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
            </Border.Triggers>
            <StackPanel Opacity="1">
                <Label>Start:</Label>
                <TextBlock Name="startAddress" Width="130" HorizontalAlignment="Left" TextWrapping="Wrap" FontStyle="Normal" FontWeight="Bold"></TextBlock>
                <Label>Koniec:</Label>
                <TextBlock Name="endAddress" HorizontalAlignment="Left" Width="130" TextWrapping="Wrap" FontStyle="Normal" FontWeight="Bold"></TextBlock>
                <Label>Odległość:</Label>
                <TextBlock Name="distance" FontStyle="Normal" FontWeight="Bold"></TextBlock>
            </StackPanel>
        </Border>
    </Grid>
</Window>
